<?php
class DoBatchEditAction extends BackendAction
{
	public function execute()
	{
		foreach ($_POST['user'] as $attrId => $user)
		{
			$user['id'] = $attrId;
			if (!isset($user['disabled']))
			{
				$user['disabled'] = 0;
			}
			UserService::updateUser($user);
		}
		$this->view->result["code"] = 200;
		$this->view->result["message"] = "用户资料批量修改成功";
		$this->view->render();
	}
}